package com.heepay.controller;

import com.heepay.service.UserBindService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/other/service")
public class OtherServiceController {

    @Autowired
    private UserBindService userBindService;

    /**
     * 提供远程调用
     * 根据用户id查询支付密码
     *
     * @param userId
     * @return
     */
    @GetMapping("/get/password/{userId}")
    public String getPassword(@PathVariable("userId") Integer userId) {
        String password = userBindService.getPassword(userId);
        return password;
    }
}
